import { Type } from 'class-transformer';
import { IsDateString, IsNumber, IsOptional } from 'class-validator';

export class UpdateOrderDto {
  @IsNumber()
  @IsOptional()
  userId?: number;

  @IsNumber()
  @IsOptional()
  roomID?: number;

  @IsDateString({}, { message: '请输入有效的入住日期' })
  @IsOptional()
  @Type(() => Date)
  checkInDate?: Date;

  @IsDateString({}, { message: '请输入有效的离店日期' })
  @IsOptional()
  @Type(() => Date)
  checkOutDate?: Date;
}
